package com.softa.common.dao;

import com.softa.common.entity.SysResource;
import com.softa.common.sysconfig.mybatis.mapper.BootBaseMapper;
import com.softa.common.sysconfig.support.DataTableRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @author yangl
 * @date 2018/5/23
 */
public interface SysResourceMapper extends BootBaseMapper<SysResource> {
    /**
     * 更具条件查询
     *
     * @param dataGrid
     * @return
     * @see
     */
    List<SysResource> selectByCondition(DataTableRequest dataGrid);

    /**
     * 分页数量
     *
     * @param gridModel
     * @return
     * @see
     */
    long selectCountByCondition(DataTableRequest gridModel);


    List<SysResource> selectByParam(DataTableRequest dataGrid);

    int deleteByIdAndParentIds(@Param("ids") String ids);

    List<SysResource> selectAllByParentId(@Param("parentId") Long parentId);

    List<SysResource> selectResourceByUser(@Param("parentId") Long parentId, @Param("username") String username);
}
